ci: run build, vet, and tests on main pushes and PRs - #2
Merged
Conversation
Adds a Test workflow alongside the existing image publish: gofmt gate, go build, go vet, and go test -race. Triggers on pushes to main and on every pull request, plus manual dispatch. Go version comes from go.mod via go-version-file so CI tracks the module rather than pinning a version that can silently drift. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
Testworkflow so every push tomainand every pull request is gated on the code actually building and passing.What runs
gofmt -l .(fails on non-empty output)go build ./...go vet ./...go test -race ./...Triggers: pushes to
main, every pull request (no branch filter, so PRs from any branch are covered), plusworkflow_dispatchfor manual runs.Notes
go.modviago-version-file, so bumping the module bumps CI rather than leaving a pinned version to drift.gofmt -lexits 0 whether or not files are misformatted, so the step checks for non-empty output explicitly instead of relying on the exit code.-raceneeds cgo;ubuntu-latesthas gcc withCGO_ENABLED=1by default. This could not be verified locally (no gcc in the dev sandbox) — this PR is itself the first live run.docker-publish.yml, which is unchanged.Both workflows are documented in a new CI section in
AGENTS.md.🤖 Generated with Claude Code